package com.example.agriculture.controller;

import com.example.agriculture.entity.UserInfor;
import com.example.agriculture.service.UserInforService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (UserInfor)表控制层
 *
 * @author makejava
 * @since 2022-09-12 22:14:37
 */
@RestController
@RequestMapping("userInfor")
public class UserInforController {
    /**
     * 服务对象
     */
    @Resource
    private UserInforService userInforService;

    /**
     * 通过主键查询单条数据
     *
     * @param id 主键
     * @return 单条数据
     */
    @GetMapping("selectOne")
    public UserInfor selectOne(Integer id) {
        return this.userInforService.queryById(id);
    }

}